import React, { Component } from 'react';
import Editor from 'for-editor';

class MarkdownTest extends Component {
  constructor() {
    super();
    this.state = {
      value: '### 开始编辑',
    };
  }

  handleChange(value) {
    console.log(value);
    this.setState({
      value,
    });
  }

  render() {
    const { value } = this.state;
    return <Editor value={value} onChange={value => this.handleChange(value)} />;
  }
}

export default MarkdownTest;
